﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using BLL.TrainBLLhelp;
using Model.TrainModelHelper;
using Model.SystemManage;
namespace WebService
{
    /// <summary>
    /// TrainService 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class TrainService : System.Web.Services.WebService
    {
        ItembankBLL Itembankbll = new ItembankBLL();
        ResultBLL Resultbll = new ResultBLL();

        TrainRecordBLL Recordbll = new TrainRecordBLL();
        TrainTypeBLL Typebll = new TrainTypeBLL();
        TrainMethodBLL Methodbll = new TrainMethodBLL();
        TrainNatureBLL Naturebll = new TrainNatureBLL();

        GradeBLL Gradebll = new GradeBLL();


        /// <summary>
        ///     //试题标题
        /// </summary>
        /// <returns></returns>
        [WebMethod]
    
        public List<ItembankModel> ItembankList()
        {
            return Itembankbll.ItembankList();
        }
        /// <summary>
        ///    //试题答案
        /// </summary>
        /// <returns></returns>
        [WebMethod]
     
        public List<ResultModel> ResultList()
        {
            return Resultbll.ResultList();
        }
        /// <summary>
        ///   //试题考试结果
        /// </summary>
        /// <param name="ItemId"></param>
        /// <param name="ResultId"></param>
        /// <returns></returns>
        [WebMethod]
      
        public int ExamResult(string ItemId, string ResultId)
        {
            return Resultbll.ExamResult(ItemId, ResultId);
        }
        /// <summary>
        ///      ///导入试题
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        [WebMethod]
   
        public int ItemBankAdd(string path)
        {
            return Itembankbll.ItemBankAdd(path);

        }
        /// <summary>
        ///   ///删除试题
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        [WebMethod]
      
        public int DeleteItemBank(string ID)
        {
            return Itembankbll.DeleteItemBank(ID);
        }
        /// <summary>
        ///     //类型列表
        /// </summary>
        /// <returns></returns>

        [WebMethod]
    
        public List<TrainTypeModel> TrainTypeList()
        {
            return Typebll.TrainTypeDropList();
        }
        /// <summary>
        ///        //方式列表
        /// </summary>
        /// <returns></returns>
        [WebMethod]
 
        public List<TrainMethodModel> TrainMethodList()
        {
            return Methodbll.TrainMethoList();
        }
        /// <summary>
        ///      //性质列表
        /// </summary>
        /// <returns></returns>
        [WebMethod]
   
        public List<TrainNatureModel> TrainNatureList()
        {
            return Naturebll.TrainNatureList();
        }
        /// <summary>
        ///         //总记录列表
        /// </summary>
        /// <returns></returns>
          [WebMethod]

        public List<TrainRecordModel> RecordList()
        {
            return Recordbll.TrainRecordList();
        }
          /// <summary>
          /// 成绩
          /// </summary>
          /// <returns></returns>
          [WebMethod]
          public List<GradeModel> GradList()
          {
              return Gradebll.GradList();
          }
          [WebMethod]
       public int TrainRecordAdd(TrainRecordModel s1)
        {

            return Recordbll.TrainRecordAdd(s1);
          }
          [WebMethod]
          public int ItemCount()
          {
           return    Itembankbll.ItemCount();
          }
          [WebMethod]
          public int PropleIdCount()
          {
              return Recordbll.PropleIdCount();
          }
          [WebMethod]
          public int TrainRecord_CostCount()
          {
              return Recordbll.TrainRecord_CostCount();
          }
          [WebMethod]
          public List<Dept_Model> DepList()
          {
              return  Gradebll.DepList();
          }
          [WebMethod]
          public List<EmployeeLoginInfo_Model> EmployeeLoginInfoList()
          {
              return Gradebll.EmployeeLoginInfoList();
          }
         [WebMethod]
          public int GardAdd(GradeModel s1)
          {
              return Gradebll.GardAdd(s1);
          
          }
    }
}
